<head runat="server">
    <title></title>
</head>
<style>
    function Button1_Click {
        if (TextBox1.Text=="user"&& TextBox2.Text=="123456") {
            Button1.Text="登录成功";
        }

        else {
            Button1.Text="登录失败";
        }
    }
</style>

<body>
    <form id="form1" runat="server">
        <div>
            <table style="width: 320px; text-align: center" border="1" cellpadding="6" cellspacing="0">
                <tr>
                    <td colspan="2" bgcolor="#99CCFF">用户登录</td>
                </tr>
                <tr>
                    <td>用户名</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>密 码</td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="Button1" runat="server" Text=" 登 录 " onclick="Button1_Click" />
                    <td>
                </tr>
            </table>
        </div>
    </form>
</body>

</html>